@import (once) "variables";
@import (once) "utils";

.slider {
    height: 12px;
    width: auto;
    position: relative;
    background-color: @grayLight;
    margin-bottom: 10px;

    .marker {
        height: 12px;
        width: 12px;
        cursor: pointer;
        position: absolute;
        top: 0;
        left: 0;
        background-color: @dark;
        z-index: 2;

        &:focus, &:active, &hover {
            outline: 2px @red solid;
        }
    }

    .complete {
        height: 100%;
        width: auto;
        background-color: @teal;
        z-index: 1;
        transition: background .3s ease;
    }

    & > .slider-hint {
        background-color: @white;
        position: absolute;
        z-index: 3;
        border: 1px #ccc solid;
        padding: 2px 4px;
        top: -40px;
        min-width: 30px;
        text-align: center;
        font-size: 14px;
        display: none;
		.block-shadow;
		&:before {
			display: none;
		}
    }

    &.permanent-hint {
        & > .slider-hint {
            display: block;
        }
    }

    &.hint-bottom {
        .slider-hint {
            top: 100%;
            margin-top: 5px;
        }
    }

    &.vertical {
        height: 100px;
        width: 12px;
		float: left;
		margin-right: 10px;

		&:last-child:first-child {
			margin-left: 0;
		}

        .marker {
            left: 0 ;
        }

        .complete {
            position: absolute;
            height: auto;
            width: 100% ;
            bottom: 0;
            left: 0;
        }

        .slider-hint {
            left: 100%;
            margin-left: 5px;
            margin-top: 0;
        }

        &.hint-left {
            .slider-hint {
                left: -40px;
            }
        }
    }

    &:hover {
        .complete {
            background-color: @lightTeal;
        }
    }

    &:active, &:active + .marker:active {
        .complete {
            background-color: @lightTeal;
        }
    }

    &.place-left {
        margin-right: 20px;
    }
    &.place-right {
        margin-left: 20px;
    }
}

.slider {
	&.large {
		height: 24px;

		.marker {
			width: 24px;
			height: 24px;
		}

		.slider-hint {
			min-width: 30px;
		}

		&.vertical {
			width: 24px;
			height: 100px;
		}
	}
}